<template>
  <div class="homeIndex">
    <homeHeader></homeHeader>
    <homeBanner></homeBanner>
    <lotteryModular></lotteryModular>
    <fgGameHot></fgGameHot>
    <activitiesModular></activitiesModular>
    <homeFooter></homeFooter>
  </div>
</template>

<script>
  import homeHeader from '../../components/lotteryColor/header/index';
  import homeBanner from './banner';
  import lotteryModular from './Modular/lottery';
  import fgGameHot from './Modular/fgGameHot';
  import activitiesModular from './Modular/activities';
  import homeFooter from '../../components/footer/index';
  export default {
    data() {
      return {
        theShackles: false, //枷锁
        homeData: '', //首页数据
        prize: '',
      }
    },
    created() {
      this.initData();
    },
    activated() {
      if (!this.theShackles) return;
      this.initData();
    },
    deactivated() {},
    methods: {
      initData() {
        let that = this;
        that._Util.post(that, that._Api.POST_HOME, {}, (data)=>{
          that.homeData = data;
          that.$store.commit('HOME_STATE_DATA', that.homeData);
        });
      }
    },
    components: {
      homeHeader,
      homeBanner,
      lotteryModular,
      fgGameHot,
      activitiesModular,
      homeFooter,
    },
  }
</script>
